package com.ysd.lis.controller.cri;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.SysUserDeptDto;
import com.ysd.lis.entity.SysUserDepartment;
import com.ysd.lis.entity.cri.CriUserVsDept;
import com.ysd.lis.request.CommonPageDto;
import com.ysd.lis.service.cri.CriUserVsDeptService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  危急值-用户与科室对照
 * </p>
 *
 * @author wh
 * @since 2025-04-22
 */
@RestController
@RequestMapping("/lis/cri/userVsDept")
public class CriUserVsDeptController extends BaseController {

    @Autowired
    private CriUserVsDeptService criUserVsDeptService;

    @ApiOperation("查询")
    @GetMapping("/findCriUserDeptList")
    public Result findCriUserDeptList(CommonPageDto pageParam){
        return criUserVsDeptService.findCriUserDeptList(pageParam);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteUserVsDeptList")
    public Result batchDeleteUserVsDeptList(@RequestBody List<CriUserVsDept> criUserVsDepts){
        return  criUserVsDeptService.batchDeleteUserVsDeptList(criUserVsDepts);
    }

    @ApiOperation("批量新增")
    @PostMapping("/batchAddUserDeptList")
    public Result batchAddUserDeptList(@RequestBody List<CriUserVsDept> criUserVsDepts){
        return  criUserVsDeptService.batchAddUserDeptList(criUserVsDepts);
    }
}
